<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <!-- list有多少个元素，就会产生多少个li -->
            <!-- <li v-for="item in list">{{ item }}</li> -->
            <!-- 名字可以随便写 -->
            <!-- <li v-for="value in list">{{ value }}</li> -->
            <li v-for="v in list">{{ v }}</li>
        </ul>       

        <ul>
            <!-- 完整形式，既能拿到每一项，也能拿到下标 -->
            <li v-for="(item, index) in list">{{ item }} --- {{ index }}</li>
            <!-- <li v-for="(value, idx) in list">{{ value }} --- {{ idx }}</li> -->
            <!-- <li v-for="(v, i) in list">{{ v }} --- {{ i }}</li> -->

            <!-- 下面的不推荐，虽然可以，但是起名有歧义，最好起名要有意义 -->
            <!-- <li v-for="(index, item) in list">{{ item }} --- {{ index }}</li> -->
        </ul>       
    </div>
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                   list: ['张三', '李四', '王五']
                }
            },
            methods:{
                   
            }
        })
    </script>
</body>
</html>